package com.qf.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.dto.PageDto;
import com.qf.model.entity.ModelTemplate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ModelTemplateMapper extends BaseMapper<ModelTemplate> {
    @Select("SELECT\n" +
            "\tqf_model_template.device_type_id, \n" +
            "\tqf_model_template.description\n" +
            "FROM\n" +
            "\tqf_model_template")
    List<ModelTemplate>findAll1();

    List<ModelTemplate> findAll(
            @Param("pageDto") PageDto<ModelTemplate> pageDto,
            @Param("propertyName") String propertyName,
            @Param("deviceTypeId") Long deviceTypeId,
            @Param("modelType") Integer modelType
    );

    Long count(
            @Param("pageDto") PageDto<ModelTemplate> pageDto,
            @Param("propertyName") String propertyName,
            @Param("deviceTypeId") Long deviceTypeId,
            @Param("modelType") Integer modelType
    );

}
